home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt40s1.arc / DOKERM.MOD < prev    next >
Text File  |  1986-06-11  |  2KB  |  47 lines

  1. (*----------------------------------------------------------------------*)
  2. (*               Do_Kermit --- Execute kermit protocol                  *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Do_Kermit( Transfer_Direction : CHAR );
  6.  
  7. (*----------------------------------------------------------------------*)
  8. (*                                                                      *)
  9. (*     Procedure:  Do_Kermit                                            *)
  10. (*                                                                      *)
  11. (*     Purpose:    Executes Kermit protocol                             *)
  12. (*                                                                      *)
  13. (*     Calling Sequence:                                                *)
  14. (*                                                                      *)
  15. (*        Do_Kermit( Transfer_Direction : CHAR );                       *)
  16. (*                                                                      *)
  17. (*           Transfer_Direction --- 'U' for upload, 'D' for download    *)
  18. (*                                                                      *)
  19. (*     Remarks:                                                         *)
  20. (*                                                                      *)
  21. (*        This routine loops over the send/receive portions of Kermit   *)
  22. (*        as needed.  It is not used in host mode.                      *)
  23. (*                                                                      *)
  24. (*----------------------------------------------------------------------*)
  25.  
  26. BEGIN (* Do_Kermit *)
  27.  
  28.    REPEAT
  29.  
  30.       CASE Transfer_Direction OF
  31.  
  32.          'S':   Send_Kermit_File;
  33.          'R':   Receive_Kermit_File;
  34.          ELSE
  35.                 Kermit_Really_Done := TRUE;
  36.  
  37.       END (* CASE *);
  38.  
  39.       IF ( NOT Kermit_Really_Done ) THEN
  40.          IF ( Transfer_Direction = 'S' ) THEN
  41.             Transfer_Direction := 'R'
  42.          ELSE
  43.             Transfer_Direction := 'S';
  44.  
  45.    UNTIL  Kermit_Really_Done;
  46.  
  47. END   (* Do_Kermit *);